<?php


class BuscarPropForm extends sfForm
{
  public function setup()
  {
    
    $this->setWidgets(array(
    'tipoprop' => new sfWidgetFormDoctrineChoice(array('model' => 'tipopropiedad', 'multiple' => false, 'add_empty' => false, 'order_by' => array('nombre','asc'))),
    'tipoop' => new sfWidgetFormDoctrineChoice(array('model' => 'tipooperacion', 'multiple' => false, 'add_empty' => false, 'order_by' => array('nombre','asc'))),
    'pais' => new sfWidgetFormDoctrineChoiceChain(array('chain' => array('pais', 'provincia', 'ciudad','zona'),
          'item_template' => '<td><strong>%label%<span class="star">*</span></strong>: %widget%&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>',
          'global_template' => '<table cellpadding="0" cellspacing="0"><tr>%items%</tr></table>'
    )),
    'preciomin'    => new sfWidgetFormInput(),
    'preciomax'    => new sfWidgetFormInput(),
    ));

	  
   $this->setValidators(array(

    'pais' => new sfValidatorChoiceChain(array('chain' => array('pais', 'provincia', 'ciudad','zona'))),
   ));

   $this->widgetSchema->setLabels(array(
	  'tipoprop'    => 'Tipo de Propiedad',
	  'tipoop'    => 'Tipo de Operación',
	  'preciomin'    => 'Precio mínimo',
	  'preciomax'    => 'Precio máximo',
	  'pais'    => '  ',
	 
    ));

    parent::setup();

 }



 

}
